<?xml version="1.0"?>
<component name="org.nuxeo.ecm.platform.faceted.search.dm.contentviews.override">

  <require>org.nuxeo.ecm.platform.faceted.search.dm.contentviews</require>

  <extension point="contentViews" target="org.nuxeo.ecm.platform.ui.web.ContentViewService">

    <contentView name="faceted_search_default">
      <title>label.faceted.search.default</title>
      <translateTitle>true</translateTitle>
      <emptySentence>label.content.empty.search</emptySentence>
      <translateEmptySentence>true</translateEmptySentence>

      <coreQueryPageProvider>
        <property name="coreSession">#{documentManager}</property>
        <property name="maxResults">DEFAULT_NAVIGATION_RESULTS</property>
        <whereClause docType="FacetedSearchDefault">
          <fixedPart>
            ecm:mixinType != 'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND
            ecm:currentLifeCycleState != 'deleted'
          </fixedPart>
          <predicate operator="FULLTEXT" parameter="ecm:fulltext">
            <field name="ecm_fulltext" schema="faceted_search_default"/>
          </predicate>
          <predicate operator="BETWEEN" parameter="dc:created">
            <field name="dc_created_min" schema="faceted_search_default"/>
            <field name="dc_created_max" schema="faceted_search_default"/>
          </predicate>
          <predicate operator="BETWEEN" parameter="dc:modified">
            <field name="dc_modified_min" schema="faceted_search_default"/>
            <field name="dc_modified_max" schema="faceted_search_default"/>
          </predicate>
          <predicate operator="IN" parameter="dc:creator">
            <field name="dc_creator" schema="faceted_search_default"/>
          </predicate>
          <predicate operator="IN" parameter="dc:nature">
            <field name="dc_nature" schema="faceted_search_default"/>
          </predicate>
          <predicate operator="STARTSWITH" parameter="dc:coverage">
            <field name="dc_coverage" schema="faceted_search_default"/>
          </predicate>
          <predicate operator="STARTSWITH" parameter="dc:subjects">
            <field name="dc_subjects" schema="faceted_search_default"/>
          </predicate>
          <predicate operator="STARTSWITH" parameter="ecm:path">
            <field name="ecm_path" schema="faceted_search_default"/>
          </predicate>
          <predicate operator="IN" parameter="collectionMember:collectionIds">
            <field name="ecm_collections" schema="faceted_search_default"/>
          </predicate>
        </whereClause>
        <sort ascending="true" column="dc:title"/>
        <pageSize>20</pageSize>
      </coreQueryPageProvider>

      <searchLayout name="faceted_search_default"/>

      <showPageSizeSelector>true</showPageSizeSelector>
      <useGlobalPageSize>true</useGlobalPageSize>
      <refresh>
        <event>documentChanged</event>
        <event>documentChildrenChanged</event>
      </refresh>
      <cacheKey>only_one_cache</cacheKey>
      <cacheSize>1</cacheSize>

      <resultLayouts>
        <layout iconPath="/icons/document_listing_icon.png" name="document_virtual_navigation_listing_ajax" showCSVExport="true" showSyndicationLinks="true" title="document_listing" translateTitle="true"/>
      </resultLayouts>

      <selectionList>CURRENT_SELECTION</selectionList>
      <actions category="CURRENT_SELECTION_LIST"/>

      <flags>
        <flag>FACETED_SEARCH</flag>
      </flags>
    </contentView>

  </extension>

</component>
